import {axios} from '@/script/axios.js'
// 下单购买
export function createOrder(data) {
  return axios({
    url: `/wx/index/userCardList`,
    method: 'get',
		data
  })
}

// 活动配置详情
export function getConfigInfo(activeId) {
  return axios({
    url: `/wx/index/getPageConfInfo/${activeId}`,
    method: 'get'
  })
}

// 活动详情
export function getActiveInfo(activeId) {
  return axios({
    url: `/wx/index/getAcddActivityInfo/${activeId}`,
    method: 'get'
  })
}
// 活动套餐明细
export function getPackages(activeId) {
  return axios({
    url: `/wx/index/getActivityServeInfo/${activeId}`,
    method: 'get'
  })
}
// 活动商户信息
export function getShopInfo(activeId) {
  return axios({
    url: `/wx/index/getActivityShop/${activeId}`,
    method: 'get'
  })
}

// 活动订单信息
export function getOrderList(activeId, data) {
  return axios({
    url: `/wx/index/getActivityOrder/${activeId}`,
    method: 'get',
		data
  })
}

// 活动团购信息
export function getGroupInfo(activeId) {
  return axios({
    url: `/wx/index/getActivityroupBuying/${activeId}`,
    method: 'get'
  })
}


// 生成海报
export function makeCover(activeId) {
  return axios({
    url: `/wx/index/getActivityImgUrl/${activeId}`,
    method: 'get'
  })
}


// 最终下单价
export function payPrice(data) {
  return axios({
    url: `/wx/order/payPrice`,
    method: 'post',
		data
  })
}

// 立即支付
export function saveOrder(data) {
  return axios({
    url: `/wx/order/saveOrder`,
    method: 'post',
		data
  })
}

// 获取抽奖内容
export function lotteryDetails(activeId) {
  return axios({
    url: `/wx/index/lotteryDetails/${activeId}`,
    method: 'get',
  })
}

// 抽奖
export function lottery(activeId,data) {
  return axios({
    url: `/wx/index/lottery/${activeId}`,
    method: 'get',
		data
  })
}

// 抽奖记录
export function lotteryLog(activeId) {
  return axios({
    url: `/wx/index/lotteryLog/${activeId}`,
    method: 'get',
  })
}


